package br.com.bacabeleireiros.sysbeleza.dao.impl;

import java.io.Serializable;
import java.util.List;

import org.springframework.stereotype.Repository;

import br.com.bacabeleireiros.sysbeleza.dao.IHorarioDAO;
import br.com.bacabeleireiros.sysbeleza.entity.Horario;
import br.com.bacabeleireiros.util.persistence.impl.GenericDAOImpl;

@Repository
public class HorarioDAOImpl extends GenericDAOImpl<Horario, Serializable> implements IHorarioDAO, Serializable {

	private static final long serialVersionUID = 1L;

	public HorarioDAOImpl() {
		
	}

	@Override
	public List<Horario> getAll() {
		return em.createQuery("select o from Horario o order by 2").getResultList();
	}

	@Override
	public Horario getById(Long idHorario) {
		return getById(Horario.class, idHorario);
	}

}
